package birdsong.comm.implemented;

import java.io.Serializable;

public class ClientSideMessage implements birdsong.comm.ClientSideMessage, Serializable {

		private String payload;
		private String sender;
		
		private birdsong.comm.ClientSideMessage.Type type;
		
		
	
	public ClientSideMessage(String payload, String sender, Type type) {
			super();
			this.payload = payload;
			this.sender = sender;
			this.type = type;
		}

	@Override
	public Type getType() {
		// TODO Auto-generated method stub
		return type;
	}

	@Override
	public String getPayload() {
		return payload;
	}

	@Override
	public String getSendersNickname() {
		// TODO Auto-generated method stub
		return sender;
	}
	
	public String toString(){
		
		return "["+this.getClass().getSimpleName()+"][Sender]:"+sender +"<...>[Payload]:"+payload+"<...>[Type]:"+type;
		
	}

}
